import request from '@/utils/request.js'

//加入购物车
export const addCart = ({ skuId, count }) => {
  return request.post('/member/cart', { skuId, count })
}

//获取购物车
export const getCart = () => {
  return request.get('/member/cart')
}

//删除购物车
export const delcart = (id) => {
  const ids = [id]
  return request.delete('/member/cart', {
    data: {
      ids
    }
  })
}
//修改购物车
export const xiugaiCart = (data) => {
  return request.put('/member/cart/selected', data)
}
